home *** CD-ROM | disk | FTP | other *** search
/ Graphics & Sound Program…ng Techniques for the Mac / Graphics and Sound Programming Techniques for the Mac.iso / M&T Graphics & Sound Examples / Symantec Versions / C09 App-QuickTime / P01 Film Edit / WindRecordAccess.c < prev    next >
Encoding:
Text File  |  1995-08-05  |  2.9 KB  |  126 lines  |  [TEXT/KAHL]

  1. //____________________________________________________________
  2. //    WindRecordAccess.c
  3. //
  4. //    Copyright © Dan Parks Sydow, 1995
  5. //    From the book:
  6. //    "Graphics and Sound Programming Techniques for the Mac",
  7. //    M&T Books, 1995
  8.  
  9.  
  10. //____________________________________________________________
  11.  
  12. #include "Defines.h"
  13. #include "DataTypes.h"
  14. #include "Globals.h"
  15. #include "WindRecordAccess.h"
  16.  
  17.  
  18. //____________________________________________________________
  19.  
  20. void  SetWindowType( WindowPtr theWindow, short type )
  21. {
  22.    BigWindRecordPeek  theBigPeek;
  23.  
  24.    theBigPeek = (BigWindRecordPeek)theWindow;
  25.    theBigPeek->theWindType = type;
  26. }
  27.  
  28.  
  29. //____________________________________________________________
  30.  
  31. void  SetWindowFileReference( WindowPtr theWindow, short theFileRefNum )
  32. {
  33.    BigWindRecordPeek  theBigPeek;
  34.  
  35.    theBigPeek = (BigWindRecordPeek)theWindow;
  36.    theBigPeek->theFileReference = theFileRefNum;
  37. }
  38.  
  39.  
  40. //____________________________________________________________
  41.  
  42. void  SetWindowMovieResourceID( WindowPtr theWindow, short theMovieResID )
  43. {
  44.    BigWindRecordPeek  theBigPeek;
  45.  
  46.    theBigPeek = (BigWindRecordPeek)theWindow;
  47.    theBigPeek->theMovieResourceID = theMovieResID;
  48. }
  49.  
  50.  
  51. //____________________________________________________________
  52.  
  53. void  SetWindowMovie( WindowPtr theWindow, Movie theMovie )
  54. {
  55.    BigWindRecordPeek  theBigPeek;
  56.  
  57.    theBigPeek = (BigWindRecordPeek)theWindow;
  58.    theBigPeek->theMovie = theMovie;
  59. }
  60.  
  61.  
  62. //____________________________________________________________
  63.  
  64. void  SetWindowController( WindowPtr theWindow, MovieController theController )
  65. {
  66.    BigWindRecordPeek  theBigPeek;
  67.  
  68.    theBigPeek = (BigWindRecordPeek)theWindow;
  69.    theBigPeek->theController = theController;
  70. }
  71.  
  72.  
  73. //____________________________________________________________
  74.  
  75. short  GetWindowType( WindowPtr theWindow )
  76. {
  77.    BigWindRecordPeek  theBigPeek;
  78.  
  79.    theBigPeek = (BigWindRecordPeek)theWindow; 
  80.    return ( theBigPeek->theWindType );
  81. }
  82.  
  83.  
  84. //____________________________________________________________
  85.  
  86. short  GetWindowFileReference( WindowPtr theWindow )
  87. {
  88.    BigWindRecordPeek  theBigPeek;
  89.  
  90.    theBigPeek = (BigWindRecordPeek)theWindow; 
  91.    return ( theBigPeek->theFileReference );
  92. }
  93.  
  94.  
  95. //____________________________________________________________
  96.  
  97. short  GetWindowMovieResourceID( WindowPtr theWindow )
  98. {
  99.    BigWindRecordPeek  theBigPeek;
  100.  
  101.    theBigPeek = (BigWindRecordPeek)theWindow; 
  102.    return ( theBigPeek->theMovieResourceID );
  103. }
  104.  
  105.  
  106. //____________________________________________________________
  107.  
  108. Movie  GetWindowMovie( WindowPtr theWindow )
  109. {
  110.    BigWindRecordPeek  theBigPeek;
  111.  
  112.    theBigPeek = (BigWindRecordPeek)theWindow; 
  113.    return ( theBigPeek->theMovie );
  114. }
  115.  
  116.  
  117. //____________________________________________________________
  118.  
  119. MovieController  GetWindowController( WindowPtr theWindow )
  120. {
  121.    BigWindRecordPeek  theBigPeek;
  122.  
  123.    theBigPeek = (BigWindRecordPeek)theWindow; 
  124.    return ( theBigPeek->theController );
  125. }
  126.